package com.example.mydemo.cate.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.mydemo.cate.entity.Cate;
import com.example.mydemo.cate.mapper.CateMapper;
import com.example.mydemo.cate.service.ICateService;
import com.example.mydemo.companyType.entity.CompanyType;
import com.example.mydemo.companyType.mapper.CompanyTypeMapper;
import com.example.mydemo.companyType.service.ICompanyTypeService;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class CateServiceImpl extends ServiceImpl<CateMapper, Cate> implements ICateService {

    @Override
    public Map<Integer, String> idName() {
        List<Cate> cates = list();
        Map<Integer, String> map = new HashMap<>();
        for (Cate cate : cates) {
            map.put(cate.getId(), cate.getName());
        }



        return map;
    }
}
